package com.burst.reptile.common.constant;

import io.jsonwebtoken.Claims;

/**
 * 通用常量信息
 * @author wujin
 *
 * @date: 2020年6月18日 下午10:21:22
 */
public class Constants {
	
	/**
	 * 默认头像
	 */
	public static String DEFAULT_AVATAR = "https://sxp-1259003793.cos.ap-chongqing.myqcloud.com/images/b73c4cb79c6243889e594029a4815eab.png";
	
	/**
	 * 男生头像
	 */
	public static String BOY_AVATAR = "https://sxp-1259003793.cos.ap-chongqing.myqcloud.com/images/a3ca2d2ae90b4faf856cc5d03a7e8507.png";
	
	/**
	 * 女生头像
	 */
	public static String GIRL_AVATAR = "https://sxp-1259003793.cos.ap-chongqing.myqcloud.com/images/b73c4cb79c6243889e594029a4815eab.png";
	
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";
    
    /**
     * 文件上传 redis key
     */
    public static final String UPLOAD_PROGRESS = "upload_progress:";
    
    /**
     * 开放省市区地址redis key
     */
    public static final String CITY_KEY = "city_key:address";
    
    /**
     * 所有省市区地址树redis key
     */
    public static final String CITY_KEY_TREE = "city_key:address_tree";
    
    /**
     * 评论点赞 key
     */
    public static final String PRAISE_KEY = "praise_key:comment";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 5;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";
    
    /**
     * 站点
     */
    public static final String SITE = "site";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";
    
    /**
     * cookie
     */
    public static final String COOKIE_AUTH = "zp_authorization";
    
    /**
     * 城市站点
     */
    public static final String CITY_SITE = "city_site";
    
    /**
     * 微信下程序access_token缓存KEY
     */
    public static final String ACCESS_TOKEN = "access_token:";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 用户ID
     */
    public static final String JWT_USERID = "userid";

    /**
     * 用户名称
     */
    public static final String JWT_USERNAME = Claims.SUBJECT;

    /**
     * 用户头像
     */
    public static final String JWT_AVATAR = "avatar";

    /**
     * 创建时间
     */
    public static final String JWT_CREATED = "created";

    /**
     * 用户权限
     */
    public static final String JWT_AUTHORITIES = "authorities";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";
    
    /**
     * 请求协议 https
     */
    public static final String HTTPS = "https://";
    
    /**
     * 请求协议 http
     */
    public static final String HTTP = "http://";
    
    /**
     * 腾讯云 cos 图片存放文件夹
     */
    public static final String IMG_KEY = "images/";
    
    /**
     * 腾讯云 cos 视频存放文件夹
     */
    public static final String VIDEO_KEY = "video/";
    
    /**
     * 腾讯云 cos 头像存放文件夹
     */
    public static final String AVATAR_KEY = "avatar/";
    
    /**
     * 定时发布信息任务分组名称
     */
    public static final String PUBLISH = "PUBLISH";

	/**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
    
}
